if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GetAllProductFromStorage]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_GetAllProductFromStorage]
GO
CREATE PROC sp_GetAllProductFromStorage
AS
BEGIN
	SELECT A.ID, A.ProductID, A.WarehouseID, Amount, ProductionOrigin, A.LastUpdate,
		B.ProductName
		FROM Storage As A
			INNER JOIN Product As B ON A.ProductID=B.ID
END
